package com.itheima.health.dao;

import com.itheima.health.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @package：com.itheima.health.dao
 * @Author: mint
 * @Date: 2024/7/13 10:28
 */

public interface UserDao {
    @Select("select * from t_user where username = #{username}")
    User findByUsername(String username);
    @Select("select * from t_user where telephone = #{telephone}")
    User findByTelephone(String telephone);
    @Insert("insert into t_user (username, password, telephone) values (#{username}, #{password}, #{telephone})")
    void insert(User registerUser);

}
